/*
Date:20210506 17:42PM
key:新数组第一个元素不用动
*/
class Solution {
public:
    vector<int> decode(vector<int>& encoded, int first) 
    {
        vector<int>v;
        v.resize(encoded.size()+1);
        v[0]=first;
        for(int i=1;i<v.size();i++)
        {
            v[i]=encoded[i-1]^v[i-1];
        }
        return v;
    }
};